home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997: The Complete Utilities Toolkit / macworld-complete-utilities-1997.iso / Programming / Little Smalltalk v3.1.5 / C Source / Sources / InitWinPrim.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-22  |  1.4 KB  |  84 lines  |  [TEXT/KAHL]

  1. /*
  2.     stdwin window primitives
  3.     written by tim budd, january 1989
  4.     
  5.     Special version omitting windowing calls for use by
  6.     initial image creator.
  7.     
  8.     Julian Barkway, May 1994.
  9. */
  10.  
  11. # include <stdio.h>
  12. # include <stdlib.h>
  13. # include "env.h"
  14. # include "memory.h"
  15. # include "names.h"
  16.  
  17. #ifdef THINKC
  18. #include "InitWinPrim.proto.h"
  19. #endif
  20.  
  21. extern object trueobj, falseobj;
  22. extern boolean parseok;
  23. extern int initial;
  24.  
  25. /* report a fatal system error */
  26. noreturn sysError(char *s1, char *s2)
  27. {    char buffer[1024];
  28.  
  29.     if (initial) {
  30.         ignore fprintf(stderr,"%s\n%s\n", s1, s2);
  31.  
  32.         }
  33.     ignore abort();
  34. }
  35.  
  36. /* report a fatal system error */
  37. noreturn sysWarn(char *s1, char *s2)
  38. {    char buffer[1024];
  39.  
  40.     if (initial) {
  41.         ignore fprintf(stderr,"%s\n%s\n", s1, s2);
  42.         }
  43. }
  44.  
  45. void compilWarn(char *selector, char *str1, char *str2)
  46. {    char buffer[1024];
  47.  
  48.     if (initial) {
  49.         ignore fprintf(stderr,"compiler warning: Method %s : %s %s\n", 
  50.             selector, str1, str2);
  51.         }
  52. }
  53.  
  54. void compilError(char *selector, char *str1, char *str2)
  55. {    char buffer[1024];
  56.  
  57.     if (initial) {
  58.         ignore fprintf(stderr,"compiler error: Method %s : %s %s\n", 
  59.             selector, str1, str2);
  60.         }
  61.     parseok = false;
  62. }
  63.  
  64. noreturn dspMethod(char *cp, char *mp)
  65. {
  66.     /*ignore fprintf(stderr,"%s %s\n", cp, mp);*/
  67. }
  68.  
  69. void givepause(void)
  70. {    char buffer[80];
  71.  
  72.     if (initial) {
  73.         ignore fprintf(stderr,"push return to continue\n");
  74.         ignore gets(buffer);
  75.         }
  76. }
  77.  
  78.  
  79. object sysPrimitive (int primitiveNumber, object *arguments)
  80. {    
  81.     return newInteger (0);
  82. }
  83.  
  84.